package com.dxysun.design.memento;

import java.util.Stack;

public class Caretaker
{
	private Stack<Memento> mementoStack;

	public Caretaker()
	{
		this.mementoStack = new Stack<>();
	}

	public Memento getMemento()
	{
		return mementoStack.pop();
	}

	public void storeMemento(Memento memento)
	{
		mementoStack.push(memento);
	}
}
